package service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import dao.*;
import pojo.*;

import java.io.IOException;
import java.sql.SQLException;

public class schooltreasure_teacherService {

    public int addSchooltreasure_teacher(teacher teacher) throws SQLException {
        schooltreasure_teacherDao schooltreasure_teacherDao= new schooltreasure_teacherDaoImp();

        return  schooltreasure_teacherDao.addSchooltreasure_teacher(teacher);
    }




    public int denglu(String userName, int password) throws SQLException {

        schooltreasure_teacherDao schooltreasure_teacherDao= new schooltreasure_teacherDaoImp();
        return schooltreasure_teacherDao.denglu(userName,password);
    }





    public int selectUserName(String userName) throws SQLException, IOException, ClassNotFoundException {
        schooltreasure_teacherDao schooltreasure_teacherDao= new schooltreasure_teacherDaoImp();
        return schooltreasure_teacherDao.selectUserName(userName) ;
    }

    /**
     * 显示教师表数据
     * @return
     */
    public JSONArray showTea() throws SQLException {
        TeacherDao teacherDao=new TeacherDaoImp();
        return teacherDao.showTea();
    }


}
